package com.he.feign;

import com.he.pojo.User;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "SPRINGCLOUD-PROVIDER")//标注了FeignClient，所以openfeign会自动解析，需要生成调用代码
public interface ServiceProviderService {
    //provider的controller方法输入，输出，不需要实现，feign会自动解析
    @GetMapping("/user/getUserById/{userId}")
    User getUser(@PathVariable("userId") Integer userId);
}
